﻿CREATE TABLE [dbo].[tbl_member_smallgroup](
	[member_smallgroup_id] [int] IDENTITY(1,1) NOT NULL,
	[member_id] [int] NOT NULL,
	[smallgroup_id] [uniqueidentifier] NOT NULL,
	[joined_dttm] [datetime] NOT NULL,
 CONSTRAINT [PK_tbl_member_smallgroup] PRIMARY KEY CLUSTERED 
(
	[member_smallgroup_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbl_member_smallgroup]  WITH NOCHECK ADD  CONSTRAINT [FK_tbl_member_smallgroup_tbl_member_smallgroup] FOREIGN KEY([member_id])
REFERENCES [dbo].[tbl_member] ([member_id])
NOT FOR REPLICATION 
GO

ALTER TABLE [dbo].[tbl_member_smallgroup] CHECK CONSTRAINT [FK_tbl_member_smallgroup_tbl_member_smallgroup]
GO

ALTER TABLE [dbo].[tbl_member_smallgroup]  WITH NOCHECK ADD  CONSTRAINT [FK_tbl_member_smallgroup_tbl_smallgroup] FOREIGN KEY([smallgroup_id])
REFERENCES [dbo].[tbl_smallgroup] ([smallgroup_id])
NOT FOR REPLICATION 
GO

ALTER TABLE [dbo].[tbl_member_smallgroup] CHECK CONSTRAINT [FK_tbl_member_smallgroup_tbl_smallgroup]
GO

